package http_middleware

import (
	"gitee.com/zaper/private-logger"
	"github.com/gin-gonic/gin"
)

func OperationLog() gin.HandlerFunc {
	return func(context *gin.Context) {
		context.Next()
		if context.Writer.Status() == 200 {
			logger.Info("Record operation success")
		} else {
			logger.Error("Record operation fail")
		}
	}
}
